package com.zjq.designpatterns.struct.appearance.code;/*
 * 版权信息: 北京千⾥马网信科技有限公司</br>
 * Copyright ©2008-2018. All rights reserved. 京ICP备16007318号
 */

/**
 * 
 * @author jessie
 * @version 1.0
 * @date 2021/1/22
 */
public class Test {
    public static void main(String[] args) {
        PointGift gift = new PointGift("T恤衫");
        GiftExchangeService giftExchangeService = new GiftExchangeService();
        //注入进去, 如果有spring ,那么下面的都已经创建好了，就不用下面的set方法了
        giftExchangeService.setQualifyService(new QualifyService());
        giftExchangeService.setPointPaymentService(new PointPaymentService());
        giftExchangeService.setShippingService(new ShippingService());
        //兑换
        giftExchangeService.gitExchange(gift);
    }
}
